How using «git archive» in CICD gitlab |
您所在的位置:网站首页 › with gitlab pages and cicd how do you build › How using «git archive» in CICD gitlab |
Hello, I am setting up a blog with gitlab-pages using Pelican. At first I managed to deploy and access a first version that used a theme hosted on github. But now I would like to use a custom theme hosted on Gitlab repository. I used the same method of github recommended in the gitlab.ci - svn export https://github.com/getpelican/pelican-themes/trunk/ /tmp/ - pelican-themes --install /tmp/the_themeBut gitlab does not support the “svn export” command. The similar command with git is “git archive” which is supported by gitlab but only in SSH version (not HTTPS). So I try to do - mkdir /tmp/ - ssh -o StrictHostKeyChecking=no [email protected] uptime - git archive --prefix=/tmp// [email protected]:/.git HEADBut here I have the error message “Permission denied (publickey)”. Normal since I didn’t put a keys of a gitlab account in parameter. So I have to use “git clone”. - git clone https://gitlab.com//.git /tmp/ - rm -rf /tmp//.gitWhat bothers me is to download and delete the “.git” directory which is useless in my case. The command “git archive” avoids this but I don’t know how to do it without SSH keys from a gitlab account. Do you have an idea? Is there a cleaner solution? Thanks in advance |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |